package lcs.table;

import java.util.List;


/**
 * Given two strings, finds the LCS values. Contains no logic of its own, 
 * initializes and runs the necessary logic classes.
 *
 */
public class LCSTableFinder {

	/**
	 * Finds the LCS values for the given strings.
	 * 
	 * @param string1
	 * @param string2
	 * @return The LCS values of the two strings.
	 */
	public List<String> findLCS(String string1, String string2) {
		FinderTable table = TableGenerator.generateTable(string1, string2);
		List<String> solutions = new CompleteTableSearchHandler().searchTable(table);
		return solutions;
	}
	
	public String findSingleLCS(String string1, String string2) {
		FinderTable table = TableGenerator.generateTable(string1, string2);
		String solution = new SingleTableSearchHandler().searchTable(table);
		return solution;
	}

}
